Merged
Conversation
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: fd2eb391d032181459773f3498c17b198513e0d0 Filtered ref: 1ea8d5f9c22f0930a0caa27637ef9232fead3c2b This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: efd420c770bb179537c01063e98cb6990c439654 Filtered ref: d11dbbb02905535a89393e80c24274bee81fa928 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 2b5e239c6b86cde974b0ef0f8e23754fb08ff3c5 Filtered ref: dde2393b3444ae8595633863f4395f526b1b7932 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
add a chapter documenting candidate preference
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 425a9c0a0e365c0b8c6cfd00c2ded83a73bed9a0 Filtered ref: 26b9fd24259f4fc5fd7634a99dd6dda2821fb2d0 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
add gpu device side instructions
Update bootstrapping docs to account for new stage meanings
glossary: add entry for rustbuild
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 9f32ccf35fb877270bc44a86a126440f04d676d0 Filtered ref: 87b13773969f65eec6762cfe4194954e7513f59b Upstream diff: rust-lang/rust@2f3f27b...9f32ccf This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
various improvements resulting from reading Testing with CI
Document rustdoc frontend CI checks
rename primary git branch
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 4fa824bb78318a3cba8c7339d5754b4909922547 Filtered ref: b8d3c3cc8b2048bd34d7611095d36d82259331af Upstream diff: rust-lang/rust@9f32ccf...4fa824b This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
remove untrue/contentious statement
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: c5dabe8cf798123087d094f06417f5a767ca73e8 Filtered ref: d867ed05e46e3ba4d231efe9df26fcc9310b5d09 Upstream diff: rust-lang/rust@b1b464d...c5dabe8 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 8401398e1f14a24670ee1a3203713dc2f0f8b3a8 Filtered ref: 52a911b7100ca6a6ed84159c51ce514a98ae9cf5 Upstream diff: rust-lang/rust@c5dabe8...8401398 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: d3e1ccdf40ae7b7a6dc81edc073d80dad7b66f75 Filtered ref: de0859194683d26da60d5d81db7f1f2a143b591d Upstream diff: rust-lang/rust@cc328c1...d3e1ccd This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
Update to mdbook 0.5
Fix example which wrongly implied that the upper bound of edition ranges was inclusive
Rustc pull update
Fix accidental type inference in array coercion Fixes rust-lang/rust#136420. If the expectation of array element is a type variable, we should avoid resolving it to the first element's type and wait until LUB coercion is completed. We create a free type variable instead which is only used in this `CoerceMany`. [`check_expr_match`](https://github.com/rust-lang/rust/blob/847e3ee6b0e614937eee4e6d8f61094411eadcc0/compiler/rustc_hir_typeck/src/_match.rs#L72) and [`check_expr_if`](https://github.com/rust-lang/rust/blob/847e3ee6b0e614937eee4e6d8f61094411eadcc0/compiler/rustc_hir_typeck/src/expr.rs#L1329) where `CoerceMany` is also used do the [same](https://github.com/rust-lang/rust/blob/847e3ee6b0e614937eee4e6d8f61094411eadcc0/compiler/rustc_hir_typeck/src/expectation.rs#L50). ### [FCP Proposal](rust-lang/rust#140283 (comment)): > Array expressions normally lub their element expressions' types to ensure that things like `[5, 5_u8]` work and don't result in type mismatches. When invoking a generic function `fn foo<T>(_: [T; N])` with an array expression, we end up with an infer var for the element type of the array in the signature. So when typecking the first array element we compare its type with the infer var and thus subsequently require all other elements to be the same type. > > This PR changes that to instead fall back to "not knowing" that the argument type is array of infer var, but just having an infer var for the entire argument. Thus we typeck the array expression normally, lubbing the element expressions, and then in the end comparing the array expression's type with the array of infer var type. > > Things like > > ```rust > fn foo() {} > fn bar() {} > fn f<T>(_: [T; 2]) {} > > f([foo, bar]); > ``` > > and > > ```rust > struct Foo; > struct Bar; > trait Trait {} > impl Trait for Foo {} > impl Trait for Bar {} > fn f<T>(_: [T; 2]) {} > > f([&Foo, &Bar as &dyn Trait]); > ``` ### Remaining inconsistency with `if` and `match`(rust-lang/rust#145048): The typeck of array always uses the element coercion target type as the expectation of element exprs while `if` and `match` use `NoExpectation` if the expected type is an infer var. This causes that array doesn't support nested coercion. ```rust fn foo() {} fn bar() {} fn main() { let _ = [foo, if false { bar } else { foo }]; // type mismatch when trying to coerce `bar` into `foo` in if-then branch coercion. } ``` But we can't simply change this behavior to be the same as `if` and `match` since [many code](rust-lang/rust#140283 (comment)) depends on using the first element's type as expectation.
Fix lockfile update script Fixes rust-lang/rust#151354 (comment) Now passes `shellcheck` cc @ehuss
GVN: Elide more intermediate transmutes We already skipped intermediate steps like `u32` or `i32` that support any (initialized) value. This extends that to also allow skipping intermediate steps whose values are a superset of either the source or destination type. Most importantly, that means that `usize` → `NonZeroUsize` → `ptr::Alignment` and `ptr::Alignment` → `NonZeroUsize` → `usize` can skip the middle because `NonZeroUsize` is a superset of `Alignment`. Then `Alignment::as_usize` is updated to take advantage of that and let us remove some more locals in a few places. r? cjgillot
…s, r=Amanieu Add new `byte_value` and `char_value` methods to `proc_macro::Literal` Part of rust-lang/rust#136652. It adds two more methods to get unescaped `u8` and `char` from `proc_macro::Literal`. r? @Amanieu
Tweak `VecCache` to improve performance This has some tweaks to `VecCache` to improve performance. - It saves a `compare_exchange` in `complete` using the new `put_unique` function. - It removes bound checks on entries. These are instead checked in the `slot_index_exhaustive` test. - `initialize_bucket` is outlined and tuned for that. cc @Mark-Simulacrum
…mann Codegen tests for Arm Cortex-R82 This PR adds checks to the `aarch64v8r-unknown-none` target to verify that if the Cortex-R82 CPU is enabled (with `-Ctarget-cpu=cortex-r82`), that the appropriate additional AArch64 features are enabled. This is important because Cortex-R82 is (currently) the only processor implementing Armv8-R AArch64 and it implements a number of Armv8 features over and above the baseline for the architecture. Many of these features are of interest to safety-critical firmware development (for example `FEAT_RASv1p1`, which adds support for the *RAS Common Fault Injection Model Extension*) and so we anticipate them being enabled when building such firmware. We are offering these tests upstream in-lieu of a full Cortex-R82 specific target because we understand the Project has a preference for architecture-baseline targets over CPU-specific targets. ~~This PR builds on and requires rust-lang/rust#150863, but we've pulled them out as a separate PR.~~ That PR has been merged. ## Ownership This PR was developed by Ferrous Systems on behalf of Arm. Arm is the owner of these changes.
Move bigint helper tracking issues Closes rust-lang/rust#85532. This splits the remainder of the `bigint_helper_methods` tracking issue into three issues: * `signed_bigint_helpers`: rust-lang/rust#151989 * `widening_mul`: rust-lang/rust#152016 * `const_unsigned_bigint_helpers`: rust-lang/rust#152015 Note that the existing stable methods were merged under the `unsigned_bigint_helpers` feature as part of rust-lang/rust#144494.
…jieyouxu Add codegen test for SLP vectorization close: rust-lang/rust#142519 This PR adds a codegen regression test for rust-lang/rust#142519. A regression in LLVM to fail to auto-vectorize, leading to significant performance loss. The SLP vectorizer correctly groups the 4-byte operations into <4 x i8> vectors. The loop state is maintained in SIMD registers (phi <4 x i8>). The test remains robust across architectures (AArch64 vs x86_64) by allowing flexible store types (i32 or <4 x i8>).
Update documentation for `Result::ok()` The term of "discard" is misleading. An error is not discarded but converted to an `Option::None`.
Work around rustfmt giving up on a large expression - rust-lang/rustfmt#3863 --- In some cases, if rustfmt sees a string literal that is too long for it to comfortably format, it will give up on formatting the entire enclosing expression. For complex builder expressions, that will prevent auto-formatting for frustratingly large sections of code. This PR works around a particular occurrence of that phenomenon in `compiler/rustc_interface/src/util.rs`, by splitting a single error message string across multiple lines. This allows rustfmt to successfully auto-format the entire enclosing expression, which is dozens of lines long. There should be no change to compiler behaviour.
…rcote Fix missing unused_variables lint when using a match guard Within a binding pattern match guard, only real reads of a bound local impact its liveness analysis - not the fake read that is injected. Fixes rust-lang/rust#151983 r? compiler
stabilize ptr_as_ref_unchecked FCP passed in rust-lang/rust#122034. Closes rust-lang/rust#122034.
attribute parsing: pass recovery mode to Parser. Fixes rust-lang/rust#151996
Port rustc_preserve_ub_checks to attr parser Tracking issue: rust-lang/rust#131229 Port rustc_preserve_ub_checks to attr parser r? @JonathanBrouwer
rustc-dev-guide subtree update Subtree update of `rustc-dev-guide` to rust-lang/rustc-dev-guide@4bd7280. Created using https://github.com/rust-lang/josh-sync. r? @ghost
Rollup of 11 pull requests Successful merges: - rust-lang/rust#151378 (Codegen tests for Arm Cortex-R82) - rust-lang/rust#151936 (Move the `fingerprint_style` special case into `DepKindVTable` creation) - rust-lang/rust#152018 (Move bigint helper tracking issues) - rust-lang/rust#151958 (Add codegen test for SLP vectorization) - rust-lang/rust#151974 (Update documentation for `Result::ok()`) - rust-lang/rust#151975 (Work around rustfmt giving up on a large expression) - rust-lang/rust#151990 (Fix missing unused_variables lint when using a match guard) - rust-lang/rust#151995 (stabilize ptr_as_ref_unchecked) - rust-lang/rust#151999 (attribute parsing: pass recovery mode to Parser.) - rust-lang/rust#152009 (Port rustc_preserve_ub_checks to attr parser) - rust-lang/rust#152022 (rustc-dev-guide subtree update) Failed merges: - rust-lang/rust#151968 (Remove `HasDepContext` by merging it into `QueryContext`)
Use the query vtable in `query_feed` plumbing The `query_feed` function needs to be able to do two important things with (erased) query values: hash them, and debug-print them. Both of those are things that the query's vtable already knows how to do. So by passing in a vtable to `query_feed`, we can give it a nicer signature, avoid having to unerase values in the function itself, and clean up some caller-side code as well.
Use with_capacity in query_key_hash_verify and PlaceholderExpander Addresses the first two items from rust-lang/rust#137005 (comment).
Pass on the `feedable` query modifier to macros This passes on the `feedable` query modifier to macros so `QueryConfig.feedable` gives the correct result. Currently it's always false even for feedable queries. Fixing this bug enables some consistency checks for feedable queries that were previously not being performed, which has a perf impact.
skip codegen for intrinsics with big fallback bodies if backend does not need them This hopefully fixes the perf regression from rust-lang/rust#148478. I only added the intrinsics with big fallback bodies to the list; it doesn't seem worth the effort of going through the entire list. Fixes rust-lang/rust#149945 Cc @scottmcm @bjorn3
This updates the rust-version file to db3e99bbab28c6ca778b13222becdea54533d908.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@db3e99b Filtered ref: 4749411 Upstream diff: rust-lang/rust@873d468...db3e99b This merge was created using https://github.com/rust-lang/josh-sync.
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Latest update from rustc.